<?php

  // rme added
  //$aux = explode ( '|', isset($_GET['id']) ? $_GET['id'] : '' );
  //$DistrictUid = str_replace ( '"', '', $aux[0] );
  $DistrictUid = $_SESSION["DISTRICT"];
  // rme end

  require_once ( PATH_PLUGINS . 'hr' . PATH_SEP . 'class.hr.php');
  $pluginObj = new hrClass ();

  require_once ( "classes/model/HrDepartments.php" );


  $fields['DEPARTMENT_UID'] = G::GenerateUniqueID();;

  $fields['DISTRICT_ID'] = $DistrictUid;
  $fields['DEPARTMENTNAME'] = '';
  $fields['DEPARTMENTDESCRIPTION'] = '';

  $G_MAIN_MENU = 'processmaker';
  $G_SUB_MENU = 'hr/menuhrDistricts';
  $G_ID_MENU_SELECTED = 'ID_HR_DIS';
  $G_ID_SUB_MENU_SELECTED = 'ID_HR_DEPARTMENTS';


  $G_PUBLISH = new Publisher;
  $G_PUBLISH->AddContent('xmlform', 'xmlform', 'hr/hrDepartmentsEdit', '', $fields, 'hrDepartmentsSave' );  
  G::RenderPage('publish', 'blank');   
?>